package com.hll.javaweb.servlet.filter;

import javax.servlet.*;
import javax.servlet.annotation.WebFilter;
import java.io.IOException;

/**
 * @author hll
 * @create 2022-05-10 13:49
 */
// 以后请求的servlet只要符合这个路径就拦截
@WebFilter("/filter/*")
public class Filter_2 implements Filter {
  @Override
  public void doFilter(
      ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain)
      throws IOException, ServletException {
    System.out.println("filter2 in.......");
    filterChain.doFilter(servletRequest, servletResponse);
    System.out.println("filter2 return..........");
  }
}
